/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.emergency.plan.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.common.core.util.DateUtils;
import com.hopes.bizz.emergency.common.constant.enums.ParkEmergencySysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;

/**
 * 应急预案审核记录
 *
 * @author cx
 * @date 2023-10-25 13:49:41
 */
@Data
@TableName( "er_emergency_plan_audit" )
@Schema(description = "应急预案审核记录")
public class ErEmergencyPlanAuditRecordVO  {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 预案标识
	*/
    @Schema(description="预案标识")
    private Long emergencyPlanId;

	/**
	* 审核人
	*/
    @Schema(description="审核人")
    private String auditUser;

	/**
	* 审核结果
	*/
    @Schema(description="审核结果")
    private Integer auditStatus;

	/**
	* 审核意见
	*/
    @Schema(description="审核意见")
    private String auditOpinion;

	/**
	* 附件
	*/
    @Schema(description="附件")
    private String files;

	/**
	* 创建人ID
	*/
    @Schema(description="创建人ID")
    private Long createUserId;

	/**
	 * 创建时间:copy-BaseEntity
	 */
	@Schema(description="创建时间")
	private LocalDateTime createTime;

	/**
	* 修改人ID
	*/
    @Schema(description="修改人ID")
    private Long modifyUserId;

	/**
	* 修改时间:copy-BaseEntity
	*/
    @Schema(description="修改时间")
    private LocalDateTime modifyTime;

	public String getAuditStatusStr(){
		return DictResolver.getItemLabelByValue(ParkEmergencySysDictEnum.emergency_status, this.getAuditStatus());
	}

	public String getCreateTimeStr(){
		Date date = Date.from(this.getCreateTime().atZone(ZoneId.systemDefault()).toInstant());
		return DateUtils.limitDay(date);
	}

}